<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>案例</title>
</head>
<body>

<input type="text" placeholder="半径" id="a">
<input type="text" placeholder="周长" id="b">
<input type="text" placeholder="面积" id="c">


<script>

    var p = prompt("请输入半径");
    document.querySelector("#a").value = p;

    var lone = p;
    var l = Math.PI;
    var z = 2 * l * lone;
    document.querySelector("#b").value = z;
    var m = (l * lone) * (l * lone);
    document.querySelector("#c").value = m;

</script>
</body>
</html>